/*
 * @Descripttion:
 * @version:
 * @Author: 淏
 * @Date: 2023-11-18 11:29:00
 * @LastEditors: 淏
 * @LastEditTime: 2023-12-02 14:51:38
 */
import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../layout/home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/login',
  },
  {
    path: '/login',
    component: () => import('@/views/Login.vue'),
    meta: { index: -1, title: '登录' },
  },
  {
    path: '/',
    name: 'dashboard',
    component: HomeView,
    children: [
      {
        path: '/dashboard',
        component: () => import('@/views/Dashboard.vue'),
        meta: { index: 0 },
        meta: { title: '系统首页' },
      },
      {
        path: '/importList',
        meta: { index: 2 },
        component: () => import('@/views/dataImport/importList.vue'),
        meta: { title: '数据集列表' },
      },
      {
        path: '/importInfo',
        meta: { index: 3 },
        component: () => import('@/views/dataImport/importInfo.vue'),
        meta: { title: '数据集数据' },
      },
      {
        path: '/clearImport',
        meta: { index: 4 },
        component: () => import('@/views/dataImport/clearImport.vue'),
        meta: { title: '数据清洗' },
      },
      {
        path: '/collIndex',
        meta: { index: 5 },
        component: () => import('@/views/collision/index.vue'),
        meta: { title: '数据碰撞' },
      },
      {
        path: '/collResult',
        meta: { index: 6 },
        component: () => import('@/views/collision/result.vue'),
        meta: { title: '碰撞结果列表' },
      },
      {
        path: '/resultData',
        meta: { index: 11 },
        component: () => import('@/views/collision/resultData.vue'),
        meta: { title: '碰撞结果数据' },
      },
      {
        path: '/department',
        meta: { index: 7 },
        component: () => import('@/views/system/department/index.vue'),
        meta: { title: '部门管理' },
      },
      {
        path: '/log',
        meta: { index: 8 },
        component: () => import('@/views/system/log/index.vue'),
        meta: { title: '日志管理' },
      },
      {
        path: '/power',
        meta: { index: 9 },
        component: () => import('@/views/system/power/index.vue'),
        meta: { title: '权限管理' },
      },
      {
        path: '/user',
        meta: { index: 10 },
        component: () => import('@/views/system/user/index.vue'),
        meta: { title: '用户管理' },
      },
    ],
  },
]

const router = new VueRouter({
  routes,
})

export default router
